home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Memphis Amiga Group / MAG Utilities 3 (1987-03)(Memphis Amiga Group)[Disk 038].zip / MAG Utilities 3 (1987-03)(Memphis Amiga Group)[Disk 038].adf / SetFont2.use < prev   
Text File  |  1987-01-02  |  5KB  |  104 lines

  1. SetFont 2.0
  2.  
  3. by Dave Haynie (Hazy)
  4. CIS: 76703,2047
  5. Usenet:{allegra,caip,ihnp4}!cbmvax!daveh
  6. Drink:Guiness
  7.  
  8.  
  9. CHANGES FROM SetFont 1.0
  10.  
  11. SetFont 2.0's main improvement is that it allows the individual
  12. font of a CLI window to be changed without changing the font of the entire
  13. WorkBench Screen.  The old SetFont would change the default font descriptor
  14. of the WorkBench screen, which is where most new programs get their fonts.
  15. This was useful in that a font so set would be inhereted by new WorkBench
  16. applications, like new CLIs, Word Processors, Terminal Programs, and just
  17. about anything run on the WorkBench Screen (as opposed to a custom screen).
  18. What the old version doesn't do is change JUST the font of the current CLI.
  19. The new version does this.  I've thrown in the capability to also change 
  20. the default title font of the screen (based on the screen's RastPort); 
  21. this isn't incredibly useful, but it was very little extra code in addition
  22. to the two more useful functions.
  23.  
  24. WHAT IT DOES
  25.  
  26. This function changes the default fonts of the Amiga's WorkBench
  27. screen or an Amiga CLI window.  This allows programs like CLI, etc. to use a
  28. font other than one specified by Preferences.  This change isn't perfect, but
  29. it is useful.  The program is used as:
  30.  
  31. SetFont [fontname [points [place]]
  32.  
  33. Where the "fontname" is a normal Amiga font, "points" is the font's point
  34. size, and place is currently one of:
  35.  
  36. SCREENThe WorkBench Screen, ala SetFont 1.0
  37. TITLESThe WorkBench Screen's Titles
  38. WINDOWThe current CLI window
  39.  
  40. Setting the screen will essentially set the default font for newly created
  41. windows.  Setting the title font will set the text displayed for window
  42. titles and things like that.  This will look really ugly and generally not
  43. work very well if it is set to a font taller than the current screen font.
  44. Finally, setting the WINDOW font will set only the font of the calling CLI
  45. window.  This will also clear the screen, which is required to fully set
  46. the font on an open console window.  If no place is supplied, all three
  47. fonts are set.  Examples are:
  48.  
  49. SetFont(Displays current screen font)
  50. SetFont ?(Displays help text)
  51. SetFont topaz(Sets font "topaz 8" everywhere)
  52. SetFont ruby 12(Sets font "ruby 12" everywhere)
  53. SetFont topaz 11 SCREEN(Sets font "topaz 11" on screen)
  54. SetFont thin 7 TITLES WINDOW(Sets font "thin 7" on CLI and titles)
  55.  
  56. This program has a few limitations.  First of all, some programs
  57. don't support fonts other than the 80 column, 8x8 cell "topaz 8" font,
  58. which is a default ROM font.  If you're a 60 column user, you've probably 
  59. experienced this before.  Its not a problem with the Amiga as a whole, since
  60. most of the system will adjust itself.  But it may be a problem with programs
  61. that have a fixed idea of what a font should look like.  Most 80 column fonts
  62. work with most applications, and an 80 column 8x8 font will work just about
  63. everywhere.  Some programs, like CLI for instance, have trouble with
  64. proportionally-spaced fonts.  This is a "bug" or "feature" of the Amiga
  65. text display software, which is doing large amounts of spacing when only
  66. one character in a proportional font is displayed at a time.  The best thing
  67. to do is try out the font you like.  
  68.  
  69. To use SetFont as a means of changing most of the default fonts
  70. during a session, insert it in your "s:Startup-Sequence" file, as:
  71.  
  72. SetFont topaz 11
  73. LoadWB
  74. EndCLI >nil:
  75.  
  76. or something that (SetFont topaz 11 SCREEN TITLES would work just as well).
  77.  
  78. One final problem is that some applications ask the WorkBench screen
  79. to close when they start up.  It'll close if there's nothing else open on it,
  80. but when it re-opens, it'll restart with the Preferences-selected font, not
  81. the SetFont selected font.  Of course, Preferences't support arbitrary fonts
  82. (which is why this program is even necessary).  Oh well, maybe in 1.3?  The
  83. simplest way to prevent this is to leave some kind of window open, which will
  84. prevent any other application from closing the WorkBench screen.  Of course,
  85. if you need the memory that closing the WorkBench screen gives you, this
  86. would not be a good thing to do.
  87.  
  88.    BUSINESS (MUNDANE, BUT IMPORTANT):
  89.  
  90. This program is written by me, Dave Haynie, as mentioned above.
  91. I have, however, placed it in the PUBLIC DOMAIN.  That, of course, means
  92. that you can do (almost) absolutely anything with it.  You may hack it
  93. to bits, include it with YOUR product, sell it, GIVE IT AWAY, or anything
  94. else you like.  Of course, since anyone else can also give it away, it
  95. would be foolish to stick your name on it and try to sell it.  I really
  96. would like everyone to give it away, nicely, without being mean about it.
  97. If you want to use it with your product, do that too, new products for
  98. the Amiga are generally a good thing for the entire Amiga community.  You
  99. can take bit and pieces and use them in your own programs, or the whole
  100. thing for that matter.  And if you really want to have fun, you can even
  101. IMPROVE this program, as its far from perfect, and give YOUR version 
  102. away too, if you're so inclined.  That's about it for the (mundane)
  103. business section, let's get on to the (interesting) notes section.
  104.